﻿@model System.Collections.Generic.IEnumerable<KRM.Core.tblOrderItemPhoto>
<div class="row-fluid">
    <div class="span12">
        @foreach (var item in Model)
        {
            if (System.IO.File.Exists(item.PhotoSrc))
            {
            <div data-id="@item.ID" class="loadimageitem" style="height:145px;width: 165px;float: left; margin:5px" >
                                    <div  style="border: solid 1px gainsboro; padding: 5px; @(item.IsDriverManifests == 1?"background: rgb(248, 248, 0)":"")">
                                        <div style="">
                                            @item.PhotoName
                                            <div class="btn-group" style="float: right;">
                                                <a href="#" data-toggle="dropdown" class="btn dropdown-toggle"><i class="icon-cog"></i><span class="caret"></span></a>
                                                <ul class="dropdown-menu">
                                                    <li>
                                                        <a href="#" onclick="DeleteOrderItemImage(@item.ID)">Remove image from order</a>
                                                    </li>
                                                    <li>
                                                        @if (item.IsDriverManifests == 1)
                                                        {
                                                            <a href="#" onclick=" SetImageIsDriverManifest(@item.ID,0)">Is Not Driver Manifest</a>
                                                        }
                                                        else
                                                        {
                                                            <a href="#" onclick=" SetImageIsDriverManifest(@item.ID,1) ">Is Driver Manifest</a>
                                                        }
                                                    </li>
                                                    <li>
                                                        <a target="_bank" href="/load/getfile?path=@item.PhotoSrc">View Photo</a>
                                                    </li>
                                                    <li>
                                                        <a target="_blank" href="/products/ProductInstructions?path=C:\KRMTestServer\//NF38911&amp;isShortCut=True">Open Folder</a>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                       <div style="height:100px; width: 150px;margin-top: 15px;">
                                              <img style="max-height:100px; max-width: 150px" src="/load/getfile?path=@Server.UrlEncode(item.PhotoSrc)" />
                                        </div>
                                    </div>
                                </div>
            }
        }
    </div>
</div>
